﻿// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
//
// 本项目主要遵循 MIT 许可证和 Apache 许可证（版本 2.0）进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动！任何基于本项目二次开发而产生的一切法律纠纷和责任，我们不承担任何责任！

using Admin.NET.Core;
using Magicodes.ExporterAndImporter.Core;
using System.ComponentModel.DataAnnotations;

namespace Admin.NET.Application;

/// <summary>
/// 原材暂收基础输入参数
/// </summary>
public class tentativeBaseInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    public virtual long? Id { get; set; }
    
    /// <summary>
    /// 送货单号
    /// </summary>
    public virtual string? deliverynumber { get; set; }
    
    /// <summary>
    /// 物料编码
    /// </summary>
    public virtual long? itemcode { get; set; }
    
    /// <summary>
    /// 物料名称
    /// </summary>
    public virtual string? itemname { get; set; }
    
    /// <summary>
    /// 批次号
    /// </summary>
    public virtual string? lotnumber { get; set; }
    
    /// <summary>
    /// 状态
    /// </summary>
    public virtual bool? state { get; set; }
    
    /// <summary>
    /// 数量
    /// </summary>
    public virtual int? quantity { get; set; }
    
    /// <summary>
    /// 单位
    /// </summary>
    public virtual string? unit { get; set; }
    
    /// <summary>
    /// 供应商编码
    /// </summary>
    public virtual long? suppliercode { get; set; }
    
    /// <summary>
    /// 供应商名称
    /// </summary>
    public virtual string? Suppliername { get; set; }
    
    /// <summary>
    /// 库位
    /// </summary>
    public virtual long? binlocation { get; set; }
    
    /// <summary>
    /// 来料时间
    /// </summary>
    public virtual DateTime? Incomingtime { get; set; }
    
}

/// <summary>
/// 原材暂收分页查询输入参数
/// </summary>
public class PagetentativeInput : BasePageInput
{
    /// <summary>
    /// 送货单号
    /// </summary>
    public string? deliverynumber { get; set; }
    
    /// <summary>
    /// 物料编码
    /// </summary>
    public long? itemcode { get; set; }
    
    /// <summary>
    /// 物料名称
    /// </summary>
    public string? itemname { get; set; }
    
    /// <summary>
    /// 批次号
    /// </summary>
    public string? lotnumber { get; set; }
    
    /// <summary>
    /// 状态
    /// </summary>
    public bool? state { get; set; }
    
    /// <summary>
    /// 数量
    /// </summary>
    public int? quantity { get; set; }
    
    /// <summary>
    /// 单位
    /// </summary>
    public string? unit { get; set; }
    
    /// <summary>
    /// 供应商编码
    /// </summary>
    public long? suppliercode { get; set; }
    
    /// <summary>
    /// 供应商名称
    /// </summary>
    public string? Suppliername { get; set; }
    
    /// <summary>
    /// 库位
    /// </summary>
    public long? binlocation { get; set; }
    
    /// <summary>
    /// 来料时间范围
    /// </summary>
     public DateTime?[] IncomingtimeRange { get; set; }
    
    /// <summary>
    /// 选中主键列表
    /// </summary>
     public List<long> SelectKeyList { get; set; }
}

/// <summary>
/// 原材暂收增加输入参数
/// </summary>
public class AddtentativeInput
{
    /// <summary>
    /// 送货单号
    /// </summary>
    [MaxLength(64, ErrorMessage = "送货单号字符长度不能超过64")]
    public string? deliverynumber { get; set; }
    
    /// <summary>
    /// 物料编码
    /// </summary>
    public long? itemcode { get; set; }
    
    /// <summary>
    /// 物料名称
    /// </summary>
    [MaxLength(64, ErrorMessage = "物料名称字符长度不能超过64")]
    public string? itemname { get; set; }
    
    /// <summary>
    /// 批次号
    /// </summary>
    [MaxLength(64, ErrorMessage = "批次号字符长度不能超过64")]
    public string? lotnumber { get; set; }
    
    /// <summary>
    /// 状态
    /// </summary>
    public bool? state { get; set; }
    
    /// <summary>
    /// 数量
    /// </summary>
    public int? quantity { get; set; }
    
    /// <summary>
    /// 单位
    /// </summary>
    [MaxLength(32, ErrorMessage = "单位字符长度不能超过32")]
    public string? unit { get; set; }
    
    /// <summary>
    /// 供应商编码
    /// </summary>
    public long? suppliercode { get; set; }
    
    /// <summary>
    /// 供应商名称
    /// </summary>
    [MaxLength(32, ErrorMessage = "供应商名称字符长度不能超过32")]
    public string? Suppliername { get; set; }
    
    /// <summary>
    /// 库位
    /// </summary>
    public long? binlocation { get; set; }
    
    /// <summary>
    /// 来料时间
    /// </summary>
    public DateTime? Incomingtime { get; set; }
    
}

/// <summary>
/// 原材暂收删除输入参数
/// </summary>
public class DeletetentativeInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
}

/// <summary>
/// 原材暂收更新输入参数
/// </summary>
public class UpdatetentativeInput
{
    /// <summary>
    /// 主键Id
    /// </summary>    
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
    /// <summary>
    /// 送货单号
    /// </summary>    
    [MaxLength(64, ErrorMessage = "送货单号字符长度不能超过64")]
    public string? deliverynumber { get; set; }
    
    /// <summary>
    /// 物料编码
    /// </summary>    
    public long? itemcode { get; set; }
    
    /// <summary>
    /// 物料名称
    /// </summary>    
    [MaxLength(64, ErrorMessage = "物料名称字符长度不能超过64")]
    public string? itemname { get; set; }
    
    /// <summary>
    /// 批次号
    /// </summary>    
    [MaxLength(64, ErrorMessage = "批次号字符长度不能超过64")]
    public string? lotnumber { get; set; }
    
    /// <summary>
    /// 状态
    /// </summary>    
    public bool? state { get; set; }
    
    /// <summary>
    /// 数量
    /// </summary>    
    public int? quantity { get; set; }
    
    /// <summary>
    /// 单位
    /// </summary>    
    [MaxLength(32, ErrorMessage = "单位字符长度不能超过32")]
    public string? unit { get; set; }
    
    /// <summary>
    /// 供应商编码
    /// </summary>    
    public long? suppliercode { get; set; }
    
    /// <summary>
    /// 供应商名称
    /// </summary>    
    [MaxLength(32, ErrorMessage = "供应商名称字符长度不能超过32")]
    public string? Suppliername { get; set; }
    
    /// <summary>
    /// 库位
    /// </summary>    
    public long? binlocation { get; set; }
    
    /// <summary>
    /// 来料时间
    /// </summary>    
    public DateTime? Incomingtime { get; set; }
    
}

/// <summary>
/// 原材暂收主键查询输入参数
/// </summary>
public class QueryByIdtentativeInput : DeletetentativeInput
{
}

/// <summary>
/// 下拉数据输入参数
/// </summary>
public class DropdownDatatentativeInput
{
    /// <summary>
    /// 是否用于分页查询
    /// </summary>
    public bool FromPage { get; set; }
}

/// <summary>
/// 原材暂收数据导入实体
/// </summary>
[ExcelImporter(SheetIndex = 1, IsOnlyErrorRows = true)]
public class ImporttentativeInput : BaseImportInput
{
    /// <summary>
    /// 送货单号
    /// </summary>
    [ImporterHeader(Name = "送货单号")]
    [ExporterHeader("送货单号", Format = "", Width = 25, IsBold = true)]
    public string? deliverynumber { get; set; }
    
    /// <summary>
    /// 物料编码 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? itemcode { get; set; }
    
    /// <summary>
    /// 物料编码 文本
    /// </summary>
    [ImporterHeader(Name = "物料编码")]
    [ExporterHeader("物料编码", Format = "", Width = 25, IsBold = true)]
    public string itemcodeFkDisplayName { get; set; }
    
    /// <summary>
    /// 物料名称
    /// </summary>
    [ImporterHeader(Name = "物料名称")]
    [ExporterHeader("物料名称", Format = "", Width = 25, IsBold = true)]
    public string? itemname { get; set; }
    
    /// <summary>
    /// 批次号
    /// </summary>
    [ImporterHeader(Name = "批次号")]
    [ExporterHeader("批次号", Format = "", Width = 25, IsBold = true)]
    public string? lotnumber { get; set; }
    
    /// <summary>
    /// 状态
    /// </summary>
    [ImporterHeader(Name = "状态")]
    [ExporterHeader("状态", Format = "", Width = 25, IsBold = true)]
    public bool? state { get; set; }
    
    /// <summary>
    /// 数量
    /// </summary>
    [ImporterHeader(Name = "数量")]
    [ExporterHeader("数量", Format = "", Width = 25, IsBold = true)]
    public int? quantity { get; set; }
    
    /// <summary>
    /// 单位
    /// </summary>
    [ImporterHeader(Name = "单位")]
    [ExporterHeader("单位", Format = "", Width = 25, IsBold = true)]
    public string? unit { get; set; }
    
    /// <summary>
    /// 供应商编码 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? suppliercode { get; set; }
    
    /// <summary>
    /// 供应商编码 文本
    /// </summary>
    [ImporterHeader(Name = "供应商编码")]
    [ExporterHeader("供应商编码", Format = "", Width = 25, IsBold = true)]
    public string suppliercodeFkDisplayName { get; set; }
    
    /// <summary>
    /// 供应商名称
    /// </summary>
    [ImporterHeader(Name = "供应商名称")]
    [ExporterHeader("供应商名称", Format = "", Width = 25, IsBold = true)]
    public string? Suppliername { get; set; }
    
    /// <summary>
    /// 库位 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? binlocation { get; set; }
    
    /// <summary>
    /// 库位 文本
    /// </summary>
    [ImporterHeader(Name = "库位")]
    [ExporterHeader("库位", Format = "", Width = 25, IsBold = true)]
    public string binlocationFkDisplayName { get; set; }
    
    /// <summary>
    /// 来料时间
    /// </summary>
    [ImporterHeader(Name = "来料时间")]
    [ExporterHeader("来料时间", Format = "", Width = 25, IsBold = true)]
    public DateTime? Incomingtime { get; set; }
    
}
